home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / C and C++ / System / Sample 2.4 Think C distribution / unmount.c < prev    next >
Text File  |  1990-07-10  |  1KB  |  32 lines

  1. /*
  2. ;_____________________________________________________________________
  3. ;
  4. ; unmount.a - UnmountVol Trap Patch.
  5. ;
  6. ; Copyright © 1988, 1989, 1990 Northwestern University.  Permission is granted
  7. ; to use this code in your own projects, provided you give credit to both
  8. ; John Norstad and Northwestern University in your about box or document.
  9. ;    
  10. ; This routine is used to patch the UnmountVol trap when the standard
  11. ; save file dialog is presented if the report becomes full during a
  12. ; disk scan.  It simply returns to the caller with the function result
  13. ; noErr, preventing the volume unmount.  (See routine DoSave in main.c).
  14. ;
  15. ; The problem is that the standard file package attempts to unmount
  16. ; volumes before returning to the caller.  We must prevent this during
  17. ; disk scans.
  18. ;
  19. ; Entry:    (a0) = pointer to parameter block.
  20. ;
  21. ; Exit:        (d0) = function result = noErr.
  22. ;_____________________________________________________________________
  23. */
  24. #include "unmount.h"
  25.  
  26. OSErr UNMOUNT(void)
  27. {
  28.     asm {
  29.         clr.w    d0
  30.     }
  31. }
  32.